package com.netty.start;

import com.netty.proxy.RpcProxy;
import com.netty.service.IUserService;

import java.util.concurrent.TimeUnit;

/**
 * @author : zhengyao3@郑瑶
 * @date : 2020/7/3 14:43
 * @Description: 客户端测试类
 */
public class StartClientTest {
    public static void main(String[] args) throws InterruptedException {
        //1.创建代理对象
        IUserService service = (IUserService) RpcProxy.getProxy(IUserService.class);
        while (true) {
            String result = service.sayHello("测试一下");
            System.out.println(result);
            TimeUnit.SECONDS.sleep(2);
        }
    }
}
